home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc / OpenDoc Development / Debugging Support / OpenDoc™ Source Code / Imaging / RealShapes / RectShpe.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-28  |  2.5 KB  |  89 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        RectShpe.h
  3.  
  4.     Contains:    RectShape class, private to ODShape.
  5.  
  6.     Written by:    Jens Alfke
  7.  
  8.     Copyright:    © 1993 - 1994 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <3>     12/5/94    jpa        Cleanup from code review. [1203923]
  13.          <2>      8/8/94    jpa        Added Outset method [1178690]
  14.          <1>     6/15/94    jpa        first checked in
  15.                             --------Moved to SOM project and rearranged-----
  16.          <7>      5/9/94    jpa        Enable polygon clipper and GX support
  17.                                     [1162090]
  18.          <6>     3/15/94    MB        Changes to support SCpp/ASLM builds,
  19.                                     #1150864.
  20.          <5>     2/17/94    JA        Declare XMPPolygon as struct, not class.
  21.          <4>     2/16/94    JA        Include new AltPoint.h.
  22.          <3>     2/10/94    JA        Stop using ptrs to member fns.
  23.          <2>      2/9/94    JA        Renamed from ShapePrv.h --> ShapePvM.h
  24.          <6>      2/7/94    JA        Further tigerings.
  25.          <5>      2/3/94    JA        Tiger Team Makeover!
  26.          <4>     1/31/94    JA        XMPRealShape no longer derives from
  27.                                     XMPAbsShape. Other API improvements.
  28.          <3>    11/24/93    VL        Rolled back changes as ASLM build breaks
  29.                                     the THINK build.
  30.          <2>    11/23/93    VL        Made this work with ASLM.
  31.          <1>    11/23/93    JA        first checked in
  32. */
  33.  
  34.  
  35. #ifndef _RECTSHPE_
  36. #define _RECTSHPE_
  37.  
  38. #ifndef _ODTYPES_
  39. #include "ODTypes.h"
  40. #endif
  41.  
  42. #ifndef _PLFMDEF_
  43. #include "PlfmDef.h"
  44. #endif
  45.  
  46. #ifndef _REALSHPE_
  47. #include "RealShpe.h"        /* Base class*/
  48. #endif
  49.  
  50.  
  51. //==============================================================================
  52. // RectShape
  53. //==============================================================================
  54.  
  55.  
  56. class RectShape :public RealShape {
  57.     public:
  58.     
  59.     RectShape( ODGeometryMode mode, const ODRect& );
  60.     ~RectShape() {}
  61.     
  62.     ODVMethod void            GetBoundingBox( ODRect* );
  63.     ODVMethod RealShape*    SetRectangle( const ODRect* );
  64.     ODVMethod void            CopyPolygon( ODPolygon& );
  65.  
  66.     ODVMethod ODBoolean        IsSameAs( RealShape* compareShape );
  67.     ODVMethod ODBoolean        IsEmpty( );
  68.     ODVMethod ODBoolean        ContainsPoint( ODPoint point );
  69.     ODVMethod ODBoolean        IsRectangular( );
  70.     
  71.     ODVMethod RealShape*    Copy( );            // Really returns an ODRectShape*
  72.  
  73.     ODVMethod RealShape*    Transform( Environment*, ODTransform* transform );
  74.     ODVMethod RealShape*    Outset(ODCoordinate distance);
  75.     ODVMethod RealShape*    Subtract( RealShape* diffShape );
  76.     ODVMethod RealShape*    Intersect( RealShape* sectShape );
  77.     ODVMethod RealShape*    Union( RealShape* sectShape );
  78.     
  79.     protected:
  80.     ODVMethod void            InitQDRegion( );
  81.     ODVMethod gxShape        CopyGXShape( );
  82.     ODVMethod RealShape*    Clear( );                // Just clear w/o replacing
  83.  
  84.     private:
  85.     ODRect    fRect;
  86. };
  87.  
  88.  
  89. #endif /*_RECTSHPE_*/